Adds metrics endpoint#78
Conversation
| } | ||
|
|
||
| // NewPrometheusParser creates a new Prometheus metrics parser | ||
| func NewPrometheusParser() *PrometheusParser { |
There was a problem hiding this comment.
There was a problem hiding this comment.
I get a 500 when visit the link but I assume its temporary. I'll take a look tomorrow, thanks!
There was a problem hiding this comment.
Yeah looks like pkg.go.dev was offline for a bit, seems back up now. I'd also advocate for less code we need to manage and test.
There was a problem hiding this comment.
I've changed to use https://pkg.go.dev/github.com/prometheus/common/expfmt so I can use families, err := parser.TextToMetricFamilies(strings.NewReader(string(body)))
And then I can get metrics per family and add our labels.
Let me know what do you think 🙏
| } | ||
|
|
||
| // NewPrometheusParser creates a new Prometheus metrics parser | ||
| func NewPrometheusParser() *PrometheusParser { |
There was a problem hiding this comment.
Yeah looks like pkg.go.dev was offline for a bit, seems back up now. I'd also advocate for less code we need to manage and test.
- Remove custom prometheus_metrics.go - Use expfmt.TextParser for parsing and expfmt.NewEncoder for output
# Conflicts: # go.mod # pkg/inference/scheduling/scheduler.go
xenoscopic
left a comment
There was a problem hiding this comment.
LGTM, just a few minor suggestions.
Signed-off-by: Dorin Geman <dorin.geman@docker.com>
Signed-off-by: Dorin Geman <dorin.geman@docker.com>
docs: update link to avoid redirect
This PR uses the llama.cpp metrics endpoint to collect and aggregate the metrics of all active runners.
No active runners:
An active runner with
completionsmode:An active runner with
embeddingsmode: